package sg.edu.ntu.bloch.tictactoe.engine;

import java.util.HashMap;
import java.util.Map;

public enum State {
	INITIAL, WIN, LOSE, DRAW, CONTINUE;
	private static Map<String, State>map;
	static{
		map = new HashMap<String,State>();
		for(State state : State.values()){
			map.put(state.toString(), state);
		}
	}
	public static State fromString(String label) {
		return map.get(label.trim().toUpperCase());
	}
}
	